<template>
  <div class="detail">
    <div v-html="detaildata.body" class="detail_text"></div>
    <div class="img_box"><van-image :src="detaildata.image" class="vanimage"></van-image></div>
    <!-- <div><vant-image :src="detaildata.image"></vant-image></div> -->
  </div>
</template>
<script>
import "../assets/detail.css"

export default {
    data(){
       return {
        myid:'',
        detaildata:[],
       }
    },
    created(){
        this.myid = this.$route.query.id;
        console.log(this.myid);
        this.axios.get("https://apis.netstart.cn/zhihudaily/story/" + this.myid).then(res =>{
            console.log(res);
            this.detaildata = res.data.story;
            console.log("detail",this.detaildata);
        });
    }
};
// let testdata = { baseURL:'https://apis.netstart.cn/zhihudaily/stories'};
</script>
<style lang="less" scoped>
.detail{
    .detail_text{
        text-align: left;
    }
    .img_box{
        position: absolute;
        left: 0;
        top: 0;
        height: 53vw;
        width: 100vw;
        .vanimage{
            width: 100%;
            height: 100%;
        }
    }
}
</style>